﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Cadastro.aspx.cs" Inherits="VemTransporte.Views.UsuarioTransporte.Cadastro" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2>
            Criação de Nova Conta
        </h2>
        <p>
            Use o formulário abaixo para criar sua nova conta de acesso.
        </p>
        <p>
            Senha é requerido o minimo de
            <%= Membership.MinRequiredPasswordLength %>caracteres.
        </p>
        <span class="failureNotification">
            <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
        </span>
        <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification"
            ValidationGroup="RegisterUserValidationGroup" />
        <div class="accountInfo">
            <fieldset class="register">
                <legend>Informações da conta</legend>
                <p>
                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Nome do usuário:</asp:Label>
                    <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                        CssClass="failureNotification" ErrorMessage="Nome do usuário é requerido!" ToolTip="Nome do usuário é requerido!"
                        ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                </p>
                <p>
                    <asp:Label ID="Label9" runat="server" AssociatedControlID="DropDownListSexo">Sexo:</asp:Label>
                    <asp:DropDownList ID="DropDownListSexo" runat="server" Height="40px" 
                        Width="129px">
                        <asp:ListItem><-- Selecione --></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="DropDownListSexo" CssClass="field-validation-error" 
                        ErrorMessage="Sexo é requerido!">*</asp:RequiredFieldValidator>
                </p>
                <p>
                    <asp:Label ID="Label1" runat="server" AssociatedControlID="DropDownListDia">Data de nascimento:</asp:Label>
                    <asp:DropDownList ID="DropDownListDia" runat="server" Height="22px" 
                        Width="48px">
                        <asp:ListItem>Dia</asp:ListItem>
                    </asp:DropDownList>

                    <asp:Label ID="Label2" runat="server" Text=" / "></asp:Label>
                    <asp:DropDownList ID="DropDownListMes" runat="server" Height="23px" 
                        Width="140px">
                        <asp:ListItem>Mês</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label3" runat="server" Text=" / "></asp:Label>
                    <asp:DropDownList ID="DropDownListAno" runat="server" Height="22px" 
                        Width="97px">
                        <asp:ListItem>Ano</asp:ListItem>
                    </asp:DropDownList>
                </p>
                <p>
                    <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
                    <asp:TextBox ID="Email" runat="server" CssClass="textEntry"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="Email" CssClass="field-validation-error" 
                        ErrorMessage="E-mail está inválido!" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                </p>
                <p>
                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Senha:</asp:Label>
                    <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                        CssClass="failureNotification" ErrorMessage="Senha é requerida." ToolTip="Senha é requerida."
                        ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                </p>
                <p>
                    <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirmar senha:</asp:Label>
                    <asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification"
                        Display="Dynamic" ErrorMessage="Confirm Password is required." ID="ConfirmPasswordRequired"
                        runat="server" ToolTip="Confirm Password is required." ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                        ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic"
                        ErrorMessage="A senha digitada não é igual da confirmação de senha!" 
                        ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
                </p>
                
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>

                <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
                AssociatedUpdatePanelID="UpdatePanel1">
                    <ProgressTemplate>
                        <img alt="" runat="server" src="~/Content/gifs/wait_gif.gif" />
                    </ProgressTemplate>
                </asp:UpdateProgress>


                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <p>
                        <asp:Label ID="Label8" runat="server" AssociatedControlID="TextBoxCep">CEP:</asp:Label>
                        <asp:TextBox ID="TextBoxCep" runat="server" CssClass="textEntry" Width="80px" 
                            MaxLength="5"></asp:TextBox>- 
                        <asp:TextBox ID="TextBoxCEPComplemento" runat="server" CssClass="textEntry" 
                            Width="30px" MaxLength="3"></asp:TextBox>
                        <asp:Button ID="ButtonBuscaCEP" runat="server" Text="Buscar" 
                            onclick="ButtonBuscaCEP_Click" />
                    </p>
                    <p>
                        <asp:Label ID="Label7" runat="server" AssociatedControlID="TextBoxEndereco">Endereço:</asp:Label>
                        <asp:TextBox ID="TextBoxEndereco" runat="server" CssClass="textEntry" 
                            ReadOnly="True"></asp:TextBox>
                    </p>
                    <p>
                        <asp:Label ID="Label6" runat="server" AssociatedControlID="TextBoxBairro">Bairro:</asp:Label>
                        <asp:TextBox ID="TextBoxBairro" runat="server" CssClass="textEntry" 
                            ReadOnly="True"></asp:TextBox>
                    </p>
                    <p>
                        <asp:Label ID="Label5" runat="server" AssociatedControlID="TextBoxCidade">Cidade:</asp:Label>
                        <asp:TextBox ID="TextBoxCidade" runat="server" CssClass="textEntry" 
                            ReadOnly="True"></asp:TextBox>
                    </p>
                    <p>
                        <asp:Label ID="Label4" runat="server" AssociatedControlID="TextBoxEstado">Estado:</asp:Label>
                        <asp:TextBox ID="TextBoxEstado" runat="server" CssClass="textEntry" 
                            ReadOnly="True"></asp:TextBox>
                    </p>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </fieldset>
            <p class="submitButton">
                <asp:Button ID="CreateUserButton" runat="server" Text="Criar conta"
                    ValidationGroup="RegisterUserValidationGroup" OnClick="CreateUserButton_Click" />
            </p>
        </div>
    </div>
    </form>
</body>
</html>
